package com.wanlian.netty.msg;


import com.wanlian.util.QueueUtil;

import java.util.List;

public class PeerMsgQueue {
    private static QueueUtil<PeerMsg> peerMsgs = new QueueUtil<PeerMsg>();

    public static synchronized void add(PeerMsg msg) {
        peerMsgs.add(msg);
    }

    public static synchronized PeerMsg get() {
        return peerMsgs.get();
    }

    public static synchronized List<PeerMsg> get(int count) {
        return peerMsgs.get(count);
    }

    public static synchronized long size() {
        return peerMsgs.size();
    }

}
